package publics.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;


@Entity
@Table(name="proposer_guarantee")
public class ProposerGuarantee {//申请人对外担保情况
	
	 private Integer id;//ID int not null,
	 private Enterprise ent; 
	 private Float money;//担保金额（元）  Float not null,
	 private Integer period;//期限（月）  int not null,
	 private String company;//被担保单位   varchar(20) not null,
	 
	 private Integer type;//担保方式    int not null,
	 
	 private Date deadline;//到期日     date not null,
	 private Float remain;//余额       Float not null,
	   //primary key (id)
	 @Id
	 @GeneratedValue
	 @Column(name="Pro_gua_id")
	public Integer getId() {
		return id;
	}
	 @ManyToOne(fetch=FetchType.LAZY)
	 @JoinColumn(name="Ent_id",nullable=false)
	public Enterprise getEnt() {
		return ent;
	}
	 @Column(name="Pro_gua_money")
	public Float getMoney() {
		return money;
	}
	 @Column(name="Pro_gua_period")
	public Integer getPeriod() {
		return period;
	}
	 @Column(name="Pro_gua_company")
	public String getCompany() {
		return company;
	}
	 @Column(name="Pro_gua_type")
	public Integer getType() {
		return type;
	}
	 @Column(name="Pro_gua_deadline")
	public Date getDeadline() {
		return deadline;
	}
	 @Column(name="Pro_gua_remain")
	public Float getRemain() {
		return remain;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public void setEnt(Enterprise ent) {
		this.ent = ent;
	}
	public void setMoney(Float money) {
		this.money = money;
	}
	public void setPeriod(Integer period) {
		this.period = period;
	}
	public void setCompany(String company) {
		this.company = company;
	}
	public void setType(Integer type) {
		this.type = type;
	}
	public void setDeadline(Date deadline) {
		this.deadline = deadline;
	}
	public void setRemain(Float remain) {
		this.remain = remain;
	}
	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return "ProposerGuarantee [company=" + company + ", deadline="
				+ deadline + ", ent=" + ent + ", id=" + id + ", money=" + money
				+ ", period=" + period + ", remain=" + remain + ", type="
				+ type + "]";
	}
	
	
	 
}
